<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ include file="prelude.jsp" %>
<!DOCTYPE HTML PUBLIC  "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title><c:out value="${forumName}"/></title>
    <link type="text/css" rel="stylesheet" href='<c:out value="${forumPath}"/>base.css'>
    <link rel="alternate" type="application/atom+xml"
          title="<c:out value="${forumFeedName}"/>"
          href="/hot/feed"/>
  </head>
<body id=root>
<jsp:include page="all_authservices_init.jsp"/>
<div id=body>

<c:import url="page_header.jsp"/>
<div id=content>
  <div id=sidebar>
    <div class="sidebaritem">
      <jsp:include page="format_menu.jsp"/> 
    </div>
    <div class="sidebaritem">
      <div class="sidebarheader roundtop">You are</div>
      <div class="sidebarcontent">
        <c:set var="nickname" scope="request" value="${nickname}"/>
        <c:set var="user_id" scope="request" value="${user_id}"/>
        <c:set var="opera" scope="request" value="${opera}"/>
        <jsp:include page="format_personal_info.jsp"/>
      </div>
    </div>
  </div>
  <div class=main_content id=discussions>
    <div class="localnav">
      <div id="search_nav_panel">
        <div id="next_prev">
          <c:set var="q" scope="request" value="${q}"/>
          <c:set var="namespace" scope="request" value="${namespace}"/>
          <c:set var="prevPage" scope="request" value="${prevPage}"/>
          <c:set var="nextPage" scope="request" value="${nextPage}"/>
          <jsp:include page="prevnext.jsp"/>
        </div>
      </div>
      <jsp:include page="format_all_hot.jsp"/>
    </div>
    <c:forEach var="discussion" items="${discussions}">
      <jsp:useBean id="discussion" type="com.bardsoftware.foronuvolo.data.DiscussionsViewItem"/>
      <c:set var="nickname" scope="request" value="${discussion.username}"/>
      <c:set var="message" scope="request" value="${discussion.text}"/>
      <c:set var="date" scope="request" value="${discussion.startDate}"/>
      <c:set var="replyCount" scope="request" value="${discussion.replyCount}"/>
      <c:set var="viewLink" scope="request" value="${discussion.viewLink}"/>
      <c:set var="truncated" scope="request" value="${discussion.truncated}"/>
      <c:set var="tags" scope="request" value="${discussion.tags}"/>
      <c:set var="rating" scope="request" value="${discussion.rating}"/>
      <c:set var="voters" scope="application" value="${discussion.voters}"/>
      <jsp:include page="format_message.jsp"/>
      <b>Rating: <c:out value="${rating}" /></b>
    </c:forEach>
    <div id="next_prev">
      <c:set var="prevPage" scope="request" value="${prevPage}"/>
      <c:set var="nextPage" scope="request" value="${nextPage}"/>
      <c:set var="moreButtons" scope="request">
        <c:if test="${empty user_id}">
          <b class='button disabled'>&nbsp; New discussion &nbsp;</b>
        </c:if>
        <c:if test="${not empty user_id}">
          &nbsp;<a class=button href='<c:out value="${forumNewPath}"/>'>New discussion</a>&nbsp;
        </c:if>
      </c:set>
      <jsp:include page="prevnext.jsp"/>
    </div>
  </div>
</div>

</div>  <!-- content -->
</div>  <!-- body -->
</body>
</html>